//#########################################################
// 版权所有：鸽子游戏俱乐部
// 系统名称：鸽子游戏俱乐部-移动版
// 文件名称：ContactsReducer.js
// 创建时间：2017年04月22日
// 创建人员：Lemo
// 功能说明：个人中心reducer
//#########################################################

'use strict';

import * as ActionTypes from '../actions/types';

import UIConstants from '../common/uiconstants';

const initialState = {
};

function changeMycenterState(state = initialState, action) {
    switch (action.type) { 
        case ActionTypes.MY_RENTLIST_SUCCESS:
            return Object.assign({}, state, {
                rentgamelist: action.retdata,
                actionType: ActionTypes.MY_RENTLIST_SUCCESS
            });
        case ActionTypes.MY_RENTLIST_FAILED:
            return Object.assign({}, state, {
                rentgameerrormsg: action.msg,
                actionType: ActionTypes.MY_RENTLIST_FAILED
            });
        case ActionTypes.MY_RETURNLIST_SUCCESS:
            return Object.assign({}, state, {
                returngamelist: action.retdata,
                actionType: ActionTypes.MY_RETURNLIST_SUCCESS
            });
        case ActionTypes.MY_RETURNLIST_FAILED:
            return Object.assign({}, state, {
                returngameerrormsg: action.msg,
                actionType: ActionTypes.MY_RETURNLIST_FAILED
            });
        case ActionTypes.MY_FUNDHISTORY_SUCCESS:
            return Object.assign({}, state, {
                fundhistorylist: action.retdata,
                actionType: ActionTypes.MY_FUNDHISTORY_SUCCESS
            });
        case ActionTypes.MY_FUNDHISTORY_FAILED:
            return Object.assign({}, state, {
                fundhistoryerrormsg: action.msg,
                actionType: ActionTypes.MY_FUNDHISTORY_FAILED
            });
        default:
            return state;
    }
}

module.exports = changeMycenterState;